<!DOCTYPE html>
<head>
	<title><?php echo $titlu;?></title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/default.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/css/bootstrap/css/bootstrap.css">
	
	<script src="http://code.jquery.com/jquery.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>js/bootstrap.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>js/bootstrap-carousel.js"></script>
</head>
<html>
<body>
<div id="container">
<div id="logo"></div>
<div id="menu">
	<div class="navbar">
	  <div class="navbar-inner">
	    <ul class="nav" style="float: left; margin-bottom:-5px">
	      	<li class="active"><a href="<?php echo base_url();?>">Acasa</a></li>  
			<li><a href="<?php echo base_url();?>program">Program</a></li>  
			<li><a href="<?php echo base_url();?>promotii">Promotii</a></li> 
		</ul>
		<ul class="nav" style="float: right; margin-bottom:-5px">
			<?php 
			if($logat == 0){
			?>
				<li><a href="#login-modal" data-toggle="modal">Autentificare</a></li>
			<?php 
			}else if($logat == 1){
			?>
				<li class="dropdown">
					<a a class="dropdown-toggle" data-toggle="dropdown"><?php echo $nume.' '.$prenume?></a>
					<ul class="dropdown-menu">
						<li><a href="<?php echo base_url();?>login/logout">Delogare</a></li>
					</ul>
				</li>
			<?php }?>
			<li>
				<form class="navbar-search pull-right search-area" id ="search-form" action="<?php echo base_url();?>cautare" method = "POST" style="margin-bottom:2px;">
					<input type="text" placeholder="Cautare..." name="termen"  id="searched" style="margin:3px">
					<button class="btn" type="submit"><i class="icon-search"></i></button>
				</form>
			</li>
		</ul>
	  </div>
	</div>
</div>

<div id="login-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="require-auth-label" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
        <h3 id="require-auth-label">Autentificare</h3>
    </div>

    <div class="modal-body">
        <div class="row-fluid">
            <div class="span12">
                <form class="modal-form form-horizontal" action="<?php echo base_url();?>login/index" method="POST">
                    <div class="control-group">
						<div class="alert alert-block alert-error fade in" id="popup" style="display:none;">
							<button data-dismiss="alert" class="close" type="button">×</button>
							<?php if(!isset($suspendat) || (isset($suspendat) && $suspendat == 0)){
							?>
							<h4 class="alert-heading">Autentificare esuata</h4>
							<p>E-mail sau parola incorecte!</p>
							<?php
							}else if($suspendat == 5){
							?>
							<h4 class="alert-heading">Autentificare eșuată</h4>
							<p>Cont Suspendat Temporar</p>
							<?php
							}
							?>
							
						</div>
                        <div class="controls">
                            <input id="email-field" type="email" name="email" placeholder="E-mail">
                        </div>
						<br>
                        <div class="controls">
                            <input id="password-field" type="password" name="password" placeholder="Parola">
                        </div>
                    </div>

                    <div class="control-group">
                        <div class="controls">
                            <label class="checkbox">
                                <input id="session-remember-checkbox" type="checkbox" name="keep-session" value="true">Pastrati-ma autentificat
                            </label>
                        </div>

                        <div class="controls">
                            <input class="btn btn-primary" type="submit" value="Autentificare">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
	<div class="modal-footer">
		Daca nu aveti cont, va puteti <a href="<?php echo base_url(); ?>register" style="color:#39f;">inregistra</a>.
	</div>
</div>
